import axios from "@/utils/request"
import {Add_User,Add_identity,Add_api,Add_view,Set_Identity_Api,Set_Identity_View} from "@/type/addUser"
//获取身份展示
export const _getDentity=()=>axios.get("/api/user/identity")
//获取视图权限展示
export const _getView_authority=()=>axios.get("/api/user/view_authority")
//获取接口权限展示
export const _getApi_authority=()=>axios.get("/api/user/api_authority")
//添加用户
export const _addUser=(params:Add_User)=>axios.post("/api/user",params)
//添加身份
export const _addIdentity=(params:Add_identity)=>axios.get("/api/user/identity/edit",{params})
//添加api接口权限
export const _addApi=(params:Add_api)=>axios.get("/api/user/authorityApi/edit",{params})
//添加视图权限
export const _addView=(params:Add_view)=>axios.get("/api/user/authorityView/edit",{params})
//给身份添加api权限
export const _setIdentityApi=(params:Set_Identity_Api)=>axios.post("/api/user/setIdentityApi",params)
//给身份添加视图权限
export const _setIdentityView=(params:Set_Identity_View)=>axios.post("/api/user/setIdentityView",params)